Let's go over the different step types. Starting with calls and return. The call is the most
important step in a workflow. The workflow is essentially a series of
calls, a request to any HTTPS endpoint. This can also be an external
public HTTPS endpoint. Cloud workflow supports I am
authentication which means you can conveniently call Google Cloud
services that are secured by AIM. Cloud workflows also has connectors which
make it even more convenient to call Google Cloud appease. Examples include Firestore, so
this store and retrieve documents. Secret Manager to load secrets, Pub sub
to manage topics and subscriptions or publish messages. A call can also be asleep call to suspend
the execution of a workflow temporarily. This is useful if you're polling for
an operation to complete. From a step call, you can store
the response into the workflow execution memory, assign the result of a call to a
variable in memory, retrieve the data and use it to perform another
call using an expression. This is how you can use data from
one call as input to another call to pass that order ID from order
to payment for example. This is an example of
the definition of the call step. Once assigned, you can use the variable in
memory with an expression in a later step. In the second step, we are accessing the order body
ID value in the response to url. We can do this easily because Cloud
workflows automatically pauses, Jason. Now, in order to return
date from the workflow execution you need an additional step. Return, assign the result of a call to a
variable in memory, retrieve the data and use it to perform another call and
return it using an expression. This is an example of the return step. It isn't much but it's very useful
without it, you can't return results from a workflow and the workflow with
no results is a very sad workflow. To make integration with existing Google
Cloud products convenient Cloud workflows has connectors. Examples include Firestore, to list,
store and retrieve documents, Secret Manager to load secrets, Pubs Up
to manage topics and subscriptions or publish messages and Cloud SQL admin to
create the managed Cloud SQL instances. You should view connectors as a useful and functional wrapper around
an ordinary http request. Connectors abstract away the important but tedious boilerplate of error handling and
authentication. Connectors have several benefits. They handle authentication
to Google API's. They handle long running operations
transparently without polling, error handling with retry is built in and the connectors offer a convenient
interface to pass parameters. To use Cloud workflows, you must create a service account that
is used as the Cloud workflows identity. To call an authenticated Cloud Run
service, grant the Run Invoker permission to the Cloud workflows service identity
until Cloud workflows to parson IDs token. To call a Google Cloud API that
is not supported by a connector, tell Cloud workflows to
pass an OAuth2 token. It's a different kind of access
token that is used for Google apps. Here's an example of a call
configuration that uses an OIDC token. A workflow has a service identity
that authorizes it to call, invoke a Cloud Run service. This diagram shows the hierarchical
relationships between the workflow and the resources involved
in invoking the service. In summary, a workflow is a series
of steps and most steps are calls. A call is an HTTP request,
a connector call or sleep to suspend execution temporarily. Store call responses in a variable
to use them later in an expression, and the return step stops execution and
returns variable values.